package com.motu.monstercity.server.game.logic;

import com.motu.monstercity.server.game.userdata.UserItem;
import com.motu.monstercity.server.game.userdata.UserShopLimit;
import com.motu.vertx.module.utility.model.EntityManager;
import com.motu.vertx.module.utility.model.Model;

import java.util.ArrayList;
import java.util.List;

public class ShopUserData extends ShopBaseData{
    public static UserShopLimit getUserShopLimit(long userId, int shopType) {
        return (UserShopLimit) EntityManager.getEntity(UserShopLimit.class, userId, shopType);
    }

    // 获取UserShopLimit列表
    public static List<UserShopLimit> getUserShopLimitList(long userId) {
        List<UserShopLimit> list = new ArrayList<>();
        for (Model model : EntityManager.getEntityList(UserShopLimit.class, userId)) {
            UserShopLimit entity = (UserShopLimit) model;
            list.add(entity);
        }
        return list;
    }
}
